package com.cts.controller;

import com.cts.model.vo.Result;
import com.cts.service.SiteSettingService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @projectName: CBlog
 * @package: com.cts.controller.admin
 * @className: SiteSettingController
 * @author: chentongsheng
 * @description: TODO
 * @date: 2023/4/30 12:53
 * @version: 1.0
 */
@RestController
@RequestMapping("/siteSetting")
@Slf4j
public class SiteSettingController {

    @Autowired
    SiteSettingService siteSettingService;


    @RequestMapping("/getIntroduction")
    @ApiOperation("查询博客介绍信息")
    public Result getIntroduction() {

        // 构建查询条件
        Map<String, String> introduction = siteSettingService.getIntroduction();
        log.info("查询博客介绍信息");
        return Result.ok("查询成功", introduction);
    }
}
